﻿/**
 * 
 * @file OperPropTreeEvent.h
 * @brief 模型菜单点击事件处理器 
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-11-11
 * 
 */
#ifndef _OPER_TERR_EVENT_MODEL__H___
#define _OPER_TERR_EVENT_MODEL__H___

#include "OperatorsInterface/TreeEventOperator.h"
#include "FITK_Interface/FITKInterfaceGeometry/FITKGeoEnum.h"

namespace Acoustics {
    class FITKAcousticsDiscModel;
    class FITKAcousticsSEAModel;
    class FITKAcousticsFEModel;
    class FITKAcousticsPhysics;
}

//namespace EventOper{
//    class WidgetBrowserTableInterfaceOperator;
//}

namespace Interface {
    class FITKAbsVirtualTopo;
}

namespace GUIOper
{
    /**
     * @brief 模型菜单点击事件处理器
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-11-11
     */
    class  OperatorModelTreeEvent : public Oper::TreeEventOperator
    {
    public:
        /**
         * @brief Construct a new Operator Prop Tree Event object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-11
         */
        explicit OperatorModelTreeEvent();
        /**
         * @brief Destroy the Operator Prop Tree Event object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-11
         */
        virtual ~OperatorModelTreeEvent() = default;
        /**
         * @brief 树形菜单点击事件
         * @param[i]  item           树形节点
         * @param[i]  colum          点击列号
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-11
         */
        virtual void itemClicked(QTreeWidgetItem* item, int colum) override;
        /**
         * @brief 树形菜单双击事件
         * @param[i]  item           树形节点
         * @param[i]  colum          点击列号
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-11
         */
        virtual void itemDouleClicked(QTreeWidgetItem* item, int colum) override;

        /**
         * @brief 树形菜单状态改变事件
         * @param[i] item 点击对象
         * @param[i] state 改变之后的状态
         * @param[i] column 列数
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-11-11
         */
        virtual void itemStateChanged(QTreeWidgetItem *item, bool state, int column) override;
        /**
         * @brief    更新模型树菜单状态[不会更新渲染，只根据当前数据显示状态刷新菜单状态]
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        virtual void updateModelTreeItemState() override;
    private:
        /**
         * @brief 树形菜单状态改变事件
         * @param[i] type 窗口类型 1-浏览窗口 2-前处理 3-后处理
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-20
         */
        void switchWindow(const int type);
        /**
         * @brief    设置几何点可见性
         * @param[i] state                    是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-19
         */
        void setGeoPointsVisibility(bool state);
        /**
         * @brief    设置几何线可见性
         * @param[i] state                    是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-19
         */
        void setGeoEdgesVisibility(bool state);
        /**
         * @brief    设置几何面可见性
         * @param[i] state                    是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-19
         */
        void setGeoFacesVisibility(bool state);
        /**
         * @brief    设置子系统可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setSubSystemRootVisibility(bool state);
        /**
         * @brief    设置SEA可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setSEARootVisibility(bool state);
        /**
         * @brief    设置FE可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setFERootVisibility(bool state);
        /**
         * @brief    设置SEA梁可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setSEASubSystemsBeamVisibility(bool state);
        /**
         * @brief    设置SEA板可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setSEASubSystemsShellVisibility(bool state);
        /**
         * @brief    设置SEA板可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setSEASubSystemsPlateVisibility(bool state);
        /**
         * @brief    设置SEA单曲率板可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setSEASubSystemsSingleCurvaturePlateVisibility(bool state);
        /**
         * @brief    设置SEA双曲率板可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setSEASubSystemsDoubleCurvaturePlateVisibility(bool state);
        /**
         * @brief    设置SEA声腔可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setSEASubSystemsVocalCavityPlateVisibility(bool state);
        /**
         * @brief    设置SEA半无限流体可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setSEASubSystemsSemiInfiniteFluidsVisibility(bool state);
        /**
         * @brief    设置FE面可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setFEFaceVisibility(bool state);
        /**
         * @brief    设置FE结构可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setFEStructVisibility(bool state);
        /**
         * @brief    设置FE声腔可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setFEAcousticsVisibility(bool state);
        /**
         * @brief    设置FE传感器可见性[修改数据可见性]
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setSensorVisibility(bool state);
        /**
         * @brief    设置全部连接数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setConnectRootVisibility(bool state);
        /**
         * @brief    设置全部连接点数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setConnectPointVisibility(bool state);
        /**
         * @brief    设置全部连接点数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setConnectLineVisibility(bool state);
        /**
         * @brief    设置全部连接点数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setConnectAreaVisibility(bool state);
        /**
         * @brief    设置SEA全部连接点数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setConnectPointSEAVisibility(bool state);
        /**
         * @brief    设置FE全部连接点数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setConnectPointFEVisibility(bool state);
        /**
         * @brief    设置SEA全部连接线数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setConnectLineSEAVisibility(bool state);
        /**
         * @brief    设置FE全部连接线数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setConnectLineFEVisibility(bool state);
        /**
         * @brief    设置SEA全部连接面数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setConnectAreaSEAVisibility(bool state);
        /**
         * @brief    设置FE全部连接面数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setConnectAreaFEVisibility(bool state);
        /**
         * @brief    设置全部载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadRootVisibility(bool state);
        /**
         * @brief    设置全部Power载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadPowerVisibility(bool state);
        /**
         * @brief    设置全力与力矩载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadExcitationForceMomentsVisibility(bool state);
        /**
         * @brief    设置全部Constraint载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadConstraintVisibility(bool state);
        /**
         * @brief    设置全部HVACNoise载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadHVACNoiseVisibility(bool state);
        /**
         * @brief    设置全部Power梁载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadPowerBeamVisibility(bool state);
        /**
         * @brief    设置全部Power板载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadPowerShellVisibility(bool state);
        /**
         * @brief    设置全部Power声腔载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadPowerAcousticVisibility(bool state);
        /**
         * @brief    设置全部PowerFE子系统载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadPowerFESubSysVisibility(bool state);
        /**
         * @brief    设置全部Constraint梁载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadConstraintBeamVisibility(bool state);
        /**
         * @brief    设置全部Constraint板载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadConstraintShellVisibility(bool state);
        /**
         * @brief    设置全部Constraint声腔载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadConstraintAcousticVisibility(bool state);
        /**
         * @brief    设置全部ConstraintFE子系统载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadConstraintFESubSysVisibility(bool state);
        /**
         * @brief    设置全部单极子载荷数据可见性
         * @param[i] state                  是否可见
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-01-15
         */
        void setLoadMonopoleVisibility(bool state);
        /**
         * @brief    获取几何虚拓扑数据
         * @param[i] type                                       几何数据类型
         * @return   QList<Interface::FITKAbsVirtualTopo*>      虚拓扑数据链表
         * @author   BaGuijun (baguijun@163.com)
         * @date     2025-02-19
         */
        QList<Interface::FITKAbsVirtualTopo*> getAllGeometryVirTopos(Interface::FITKGeoEnum::VTopoShapeType type);
    private:
        /**
         * @brief  声学物理属性管理器
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-13
         */
        Acoustics::FITKAcousticsPhysics* _physics = nullptr;
        /**
         * @brief  离散模型
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-12
         */
        Acoustics::FITKAcousticsDiscModel* _DiscModel = nullptr;
        /**
         * @brief  SEA模型
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-12
         */
        Acoustics::FITKAcousticsSEAModel* _SEAModel = nullptr;
        /**
         * @brief  FE模型
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-11-12
         */
        Acoustics::FITKAcousticsFEModel* _FEModel = nullptr;
    };
    Register2FITKOperatorRepo(OperModelTreeEvent, OperatorModelTreeEvent);
}


#endif
